<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>emp-toolkit: /Users/wangxiao/git/emp-toolkit/emp-tool/utils/prp.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo-full-doxygen.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">emp-toolkit
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('prp_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">prp.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="prp_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="utils_2block_8h.html">block.h</a>&quot;</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="config_8h.html">config.h</a>&quot;</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="aes_8h.html">garble/aes.h</a>&quot;</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &lt;stdio.h&gt;</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#ifndef PRP_H__</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#define PRP_H__</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;</div><div class="line"><a name="l00011"></a><span class="lineno"><a class="line" href="class_p_r_p.html">   11</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_p_r_p.html">PRP</a> { <span class="keyword">public</span>:</div><div class="line"><a name="l00012"></a><span class="lineno"><a class="line" href="class_p_r_p.html#abbb7cb3f37a26e14c411c83d9ad4cc92">   12</a></span>&#160;    <a class="code" href="struct_a_e_s___k_e_y.html">AES_KEY</a> *<a class="code" href="class_p_r_p.html#abbb7cb3f37a26e14c411c83d9ad4cc92">aes</a>;</div><div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="class_p_r_p.html#ab468217e923c01101f6890ee985dc2a0">   13</a></span>&#160;    <a class="code" href="class_p_r_p.html#ab468217e923c01101f6890ee985dc2a0">PRP</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> * seed = <a class="code" href="utils_2block_8h.html#a1a61c940fcdfab9d717ed2f9c27f3602">fix_key</a>) {</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;        aes = <span class="keyword">new</span> <a class="code" href="struct_a_e_s___k_e_y.html">AES_KEY</a>;</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;        <a class="code" href="class_p_r_p.html#aa65b400126715a3fc74a48caf2bc7c79">aes_set_key</a>(seed);</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;    }</div><div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="class_p_r_p.html#a5d816cb4ec0ff0adc3207ebf1c3bb3ed">   17</a></span>&#160;    <a class="code" href="class_p_r_p.html#a5d816cb4ec0ff0adc3207ebf1c3bb3ed">~PRP</a>() {</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;        <span class="keyword">delete</span> <a class="code" href="class_p_r_p.html#abbb7cb3f37a26e14c411c83d9ad4cc92">aes</a>;</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;    }</div><div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="class_p_r_p.html#aa65b400126715a3fc74a48caf2bc7c79">   20</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_p_r_p.html#aa65b400126715a3fc74a48caf2bc7c79">aes_set_key</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> * key) {</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;        __m128i v = _mm_load_si128((__m128i*)&amp;key[0]);</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;        <a class="code" href="class_p_r_p.html#aa65b400126715a3fc74a48caf2bc7c79">aes_set_key</a>(v);</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;    }</div><div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="class_p_r_p.html#a67994b9b20d8931e54367be52523b237">   24</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_p_r_p.html#a67994b9b20d8931e54367be52523b237">aes_set_key</a>(<span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>&amp; v) {</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;        AES_set_encrypt_key(v, aes);</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;    }</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;</div><div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="class_p_r_p.html#a696f4a94e96b00fc9ac52c8ef0d16836">   29</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_p_r_p.html#a696f4a94e96b00fc9ac52c8ef0d16836">permute_block</a>(<a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *data, <span class="keywordtype">int</span> nblocks) {</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;        <span class="keywordtype">int</span> i = 0;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;        <span class="keywordflow">for</span>(; i &lt; nblocks-<a class="code" href="config_8h.html#a737cfc77a544a045fab8d3c24f70de11">AES_BATCH_SIZE</a>; i+=<a class="code" href="config_8h.html#a737cfc77a544a045fab8d3c24f70de11">AES_BATCH_SIZE</a>) {</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;            AES_ecb_encrypt_blks(data+i, AES_BATCH_SIZE, aes);</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;        }</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;        AES_ecb_encrypt_blks(data+i, (AES_BATCH_SIZE &gt;  nblocks-i) ? nblocks-i:AES_BATCH_SIZE, aes);</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    }</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    </div><div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="class_p_r_p.html#a85bdec3c6f5a6873e9c96f03fa952542">   37</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_p_r_p.html#a85bdec3c6f5a6873e9c96f03fa952542">permute_data</a>(uint8_t*data, <span class="keywordtype">int</span> nbytes) {</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;        <a class="code" href="class_p_r_p.html#a696f4a94e96b00fc9ac52c8ef0d16836">permute_block</a>((<a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *)data, nbytes/16);</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;        <span class="keywordflow">if</span> (nbytes % 16 != 0) {</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;            uint8_t extra[16];</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;            memset(extra, 0, 16);</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;            memcpy(extra, (nbytes/16*16)+(<span class="keywordtype">char</span> *) data, nbytes%16);</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;            <a class="code" href="class_p_r_p.html#a696f4a94e96b00fc9ac52c8ef0d16836">permute_block</a>((<a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>*)extra, 1);</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;            memcpy((nbytes/16*16)+(<span class="keywordtype">char</span> *) data, &amp;extra, nbytes%16);</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;        }</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    }</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;</div><div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="class_p_r_p.html#a27497c4db9526ca6a8df4fd4db9782d0">   48</a></span>&#160;    <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> <a class="code" href="class_p_r_p.html#a27497c4db9526ca6a8df4fd4db9782d0">H</a>(<a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> in, uint64_t <span class="keywordtype">id</span>) {</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;        in = double_block(in);</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;        __m128i k_128 = _mm_loadl_epi64( (__m128i <span class="keyword">const</span> *) (&amp;<span class="keywordtype">id</span>));</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;        in = <a class="code" href="utils_2block_8h.html#a939b7dd0e7479964d6fe6984b90dd5ce">xorBlocks</a>(in, k_128);</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;        <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> t = in;</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;        <a class="code" href="class_p_r_p.html#a696f4a94e96b00fc9ac52c8ef0d16836">permute_block</a>(&amp;t, 1);</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;        in =  <a class="code" href="utils_2block_8h.html#a939b7dd0e7479964d6fe6984b90dd5ce">xorBlocks</a>(in, t);</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;        <span class="keywordflow">return</span> in;  </div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    }</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    <span class="keyword">template</span>&lt;<span class="keywordtype">int</span> n&gt;</div><div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="class_p_r_p.html#ac767954d3739c873783e3eacb3b1ae4a">   58</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_p_r_p.html#ac767954d3739c873783e3eacb3b1ae4a">H</a>(<a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> out[n], <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> in[n], uint64_t <span class="keywordtype">id</span>) {</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;        <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> scratch[n];</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;        <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; n; ++i) {</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;            out[i] = scratch[i] = <a class="code" href="utils_2block_8h.html#a939b7dd0e7479964d6fe6984b90dd5ce">xorBlocks</a>(double_block(in[i]), _mm_loadl_epi64( (__m128i <span class="keyword">const</span> *) (&amp;<span class="keywordtype">id</span>)));</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;            ++id;</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;        }</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;        <a class="code" href="class_p_r_p.html#a696f4a94e96b00fc9ac52c8ef0d16836">permute_block</a>(scratch, n);</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;        <a class="code" href="utils_2block_8h.html#aba00b662d58eb830061c66d369dd61f0">xorBlocks_arr</a>(out, scratch, out, n);</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    }</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;</div><div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="class_p_r_p.html#a1c66bfbad2a249941d9f2133fc955fa1">   68</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_p_r_p.html#a1c66bfbad2a249941d9f2133fc955fa1">Hn</a>(<a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>*out, <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>* in, uint64_t <span class="keywordtype">id</span>, <span class="keywordtype">int</span> length, <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> * scratch = <span class="keyword">nullptr</span>) {</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;        <span class="keywordtype">bool</span> del = <span class="keyword">false</span>;</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;        <span class="keywordflow">if</span>(scratch == <span class="keyword">nullptr</span>) {</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;            del = <span class="keyword">true</span>;</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;            scratch = <span class="keyword">new</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>[length];</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;        }</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;        <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; length; ++i){</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;            out[i] = scratch[i] = <a class="code" href="utils_2block_8h.html#a939b7dd0e7479964d6fe6984b90dd5ce">xorBlocks</a>(double_block(in[i]), _mm_loadl_epi64( (__m128i <span class="keyword">const</span> *) (&amp;<span class="keywordtype">id</span>)));</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;            ++id;</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;        }</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;        <a class="code" href="class_p_r_p.html#a696f4a94e96b00fc9ac52c8ef0d16836">permute_block</a>(scratch, length);</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;        <a class="code" href="utils_2block_8h.html#aba00b662d58eb830061c66d369dd61f0">xorBlocks_arr</a>(out, scratch, out, length);</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;        <span class="keywordflow">if</span>(del) {</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;            <span class="keyword">delete</span>[] scratch;</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;            scratch = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;        }</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    }</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;};</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;<span class="preprocessor">#endif// PRP_H__</span></div><div class="ttc" id="class_p_r_p_html_a85bdec3c6f5a6873e9c96f03fa952542"><div class="ttname"><a href="class_p_r_p.html#a85bdec3c6f5a6873e9c96f03fa952542">PRP::permute_data</a></div><div class="ttdeci">void permute_data(uint8_t *data, int nbytes)</div><div class="ttdef"><b>Definition:</b> prp.h:37</div></div>
<div class="ttc" id="config_8h_html_a737cfc77a544a045fab8d3c24f70de11"><div class="ttname"><a href="config_8h.html#a737cfc77a544a045fab8d3c24f70de11">AES_BATCH_SIZE</a></div><div class="ttdeci">#define AES_BATCH_SIZE</div><div class="ttdef"><b>Definition:</b> config.h:4</div></div>
<div class="ttc" id="garble_2block_8h_html_a65abbf31b0a30290189cdb5059b5f785"><div class="ttname"><a href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a></div><div class="ttdeci">__m128i block</div><div class="ttdef"><b>Definition:</b> block.h:8</div></div>
<div class="ttc" id="config_8h_html"><div class="ttname"><a href="config_8h.html">config.h</a></div></div>
<div class="ttc" id="utils_2block_8h_html_a939b7dd0e7479964d6fe6984b90dd5ce"><div class="ttname"><a href="utils_2block_8h.html#a939b7dd0e7479964d6fe6984b90dd5ce">xorBlocks</a></div><div class="ttdeci">block xorBlocks(block x, block y)</div><div class="ttdef"><b>Definition:</b> block.h:35</div></div>
<div class="ttc" id="class_p_r_p_html_a67994b9b20d8931e54367be52523b237"><div class="ttname"><a href="class_p_r_p.html#a67994b9b20d8931e54367be52523b237">PRP::aes_set_key</a></div><div class="ttdeci">void aes_set_key(const block &amp;v)</div><div class="ttdef"><b>Definition:</b> prp.h:24</div></div>
<div class="ttc" id="class_p_r_p_html_a1c66bfbad2a249941d9f2133fc955fa1"><div class="ttname"><a href="class_p_r_p.html#a1c66bfbad2a249941d9f2133fc955fa1">PRP::Hn</a></div><div class="ttdeci">void Hn(block *out, block *in, uint64_t id, int length, block *scratch=nullptr)</div><div class="ttdef"><b>Definition:</b> prp.h:68</div></div>
<div class="ttc" id="struct_a_e_s___k_e_y_html"><div class="ttname"><a href="struct_a_e_s___k_e_y.html">AES_KEY</a></div><div class="ttdef"><b>Definition:</b> aes.h:57</div></div>
<div class="ttc" id="utils_2block_8h_html_a1a61c940fcdfab9d717ed2f9c27f3602"><div class="ttname"><a href="utils_2block_8h.html#a1a61c940fcdfab9d717ed2f9c27f3602">fix_key</a></div><div class="ttdeci">const char fix_key[]</div><div class="ttdef"><b>Definition:</b> block.h:130</div></div>
<div class="ttc" id="class_p_r_p_html_a27497c4db9526ca6a8df4fd4db9782d0"><div class="ttname"><a href="class_p_r_p.html#a27497c4db9526ca6a8df4fd4db9782d0">PRP::H</a></div><div class="ttdeci">block H(block in, uint64_t id)</div><div class="ttdef"><b>Definition:</b> prp.h:48</div></div>
<div class="ttc" id="aes_8h_html"><div class="ttname"><a href="aes_8h.html">aes.h</a></div></div>
<div class="ttc" id="class_p_r_p_html"><div class="ttname"><a href="class_p_r_p.html">PRP</a></div><div class="ttdef"><b>Definition:</b> prp.h:11</div></div>
<div class="ttc" id="class_p_r_p_html_abbb7cb3f37a26e14c411c83d9ad4cc92"><div class="ttname"><a href="class_p_r_p.html#abbb7cb3f37a26e14c411c83d9ad4cc92">PRP::aes</a></div><div class="ttdeci">AES_KEY * aes</div><div class="ttdef"><b>Definition:</b> prp.h:12</div></div>
<div class="ttc" id="class_p_r_p_html_a5d816cb4ec0ff0adc3207ebf1c3bb3ed"><div class="ttname"><a href="class_p_r_p.html#a5d816cb4ec0ff0adc3207ebf1c3bb3ed">PRP::~PRP</a></div><div class="ttdeci">~PRP()</div><div class="ttdef"><b>Definition:</b> prp.h:17</div></div>
<div class="ttc" id="class_p_r_p_html_aa65b400126715a3fc74a48caf2bc7c79"><div class="ttname"><a href="class_p_r_p.html#aa65b400126715a3fc74a48caf2bc7c79">PRP::aes_set_key</a></div><div class="ttdeci">void aes_set_key(const char *key)</div><div class="ttdef"><b>Definition:</b> prp.h:20</div></div>
<div class="ttc" id="class_p_r_p_html_ab468217e923c01101f6890ee985dc2a0"><div class="ttname"><a href="class_p_r_p.html#ab468217e923c01101f6890ee985dc2a0">PRP::PRP</a></div><div class="ttdeci">PRP(const char *seed=fix_key)</div><div class="ttdef"><b>Definition:</b> prp.h:13</div></div>
<div class="ttc" id="class_p_r_p_html_ac767954d3739c873783e3eacb3b1ae4a"><div class="ttname"><a href="class_p_r_p.html#ac767954d3739c873783e3eacb3b1ae4a">PRP::H</a></div><div class="ttdeci">void H(block out[n], block in[n], uint64_t id)</div><div class="ttdef"><b>Definition:</b> prp.h:58</div></div>
<div class="ttc" id="utils_2block_8h_html_aba00b662d58eb830061c66d369dd61f0"><div class="ttname"><a href="utils_2block_8h.html#aba00b662d58eb830061c66d369dd61f0">xorBlocks_arr</a></div><div class="ttdeci">void xorBlocks_arr(block *res, const block *x, const block *y, int nblocks)</div><div class="ttdef"><b>Definition:</b> block.h:37</div></div>
<div class="ttc" id="class_p_r_p_html_a696f4a94e96b00fc9ac52c8ef0d16836"><div class="ttname"><a href="class_p_r_p.html#a696f4a94e96b00fc9ac52c8ef0d16836">PRP::permute_block</a></div><div class="ttdeci">void permute_block(block *data, int nblocks)</div><div class="ttdef"><b>Definition:</b> prp.h:29</div></div>
<div class="ttc" id="utils_2block_8h_html"><div class="ttname"><a href="utils_2block_8h.html">block.h</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_eec959d81771dc8b1a750b834e1341eb.html">emp-tool</a></li><li class="navelem"><a class="el" href="dir_363cbed62d1567d90b8cbb6bda69428f.html">utils</a></li><li class="navelem"><a class="el" href="prp_8h.html">prp.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.12 </li>
  </ul>
</div>
</body>
</html>
